Skip to content

Add HT compressed Block Ack support - #1128

Open
mgonzalezlopezudc wants to merge 76 commits into
inet-framework:masterfrom
mgonzalezlopezudc:feat-ht-compressedblockack
Open

mgonzalezlopezudc wants to merge 76 commits into
inet-framework:masterfrom
mgonzalezlopezudc:feat-ht-compressedblockack

Conversation

@mgonzalezlopezudc

@mgonzalezlopezudc mgonzalezlopezudc commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add one-TID HT Compressed Block Ack support to the IEEE 802.11 QoS MAC, including originator selection, recipient bitmap construction, wire encoding, and the complete BAR/BA exchange. Basic Block Ack remains the default.

Important

Depends on #1146 (HT Greenfield) and #1148 (ADDBA transaction and agreement lifecycle). This branch is now rebased onto cleanup/feat-ht-greenfield at 6935375744, with the ADDBA prerequisite commits retained above it. Merge both prerequisites before merging this PR, then rebase onto master. Greenfield and ADDBA prerequisite changes belong to their respective PRs.

Changes

  • Correct Basic and Compressed BAR headers to 20 bytes before FCS, represent Compressed BA with a 28-byte header, and encode BAR/BA Control and Starting Sequence Control fields in little-endian wire format.
  • Route Basic and Compressed variants through HCF, frame sequences, acknowledgment processing, rate selection, protection timing, and receive reordering. Predict response rates using the correct peer for outgoing and received BARs while preserving IEEE 802.11: add HT Greenfield mode set, transmission handling, and control-response rate selection #1146's response-rate policy.
  • Generate the one-TID 64-bit compressed bitmap, including an all-zero response when matching recipient partial state is absent. Restrict compressed selection to eligible immediate agreements and unfragmented MPDUs.
  • Keep the recipient acknowledgment window authoritative, preserve leading holes and cyclic delivery order, and make receive-buffer admission transactional. Record frames at the Block Ack window start and centralize cyclic receive-window arithmetic.
  • Preserve Block Ack transaction state and correlate responses with the active receive step.
  • Reject ineligible BARs before changing receive state or renewing agreement lifetime. Preserve IEEE 802.11: fix Block Ack ADDBA transaction and agreement lifecycle #1148's active-agreement checks, generation and inactivity handling, and receive-lifetime behavior.

Capability and architecture

Compressed selection is explicitly configured on OriginatorBlockAckAgreementPolicy through localCompressedBlockAckSupported (default false) and compressedBlockAckPeerAddresses (default empty). Both local support and the configured peer address are required. This models explicit per-peer support; it does not add automatic negotiation of compressed Block Ack capability.

The feature touches IEEE 802.11 frame definitions and serialization, Block Ack agreement and acknowledgment-policy contracts, HCF dispatch, reordering, and rate/protection calculations. No feature descriptors or sealed source paths are changed, and no new architecture or naming exceptions are introduced.

HE/EHT and multi-TID Block Ack variants and broader capability-management changes are outside this feature's scope. HT Greenfield support is supplied by #1146.

Validation

Validated the rebased final tree at 79da7b5bd6 from the repository root in debug mode:

make MODE=debug -j$(nproc)
inet_run_unit_tests -m debug -f 'Ieee80211(CompressedBlockAck_1|BlockAckWindow_1|BlockAckRecord_1|MgmtFrameSerializer_1)\.test'
inet_run_module_tests -m debug -f 'Ieee80211(CompressedBlockAckRuntime|CompressedBlockAckValidation|BlockAckResponseCorrelation_1|ConfiguredResponseRateSelection)\.test'
doc/project/enforcement/check-architecture.sh src/inet/linklayer/ieee80211
git diff --check cleanup/feat-ht-greenfield..HEAD

The debug build, all four selected unit tests, all four selected module tests, scoped architecture checks, and whitespace checks passed. Tests used runner defaults without explicit run or seed overrides. The previously reported compressed Block Ack wraparound test failure is resolved; Ieee80211CompressedBlockAck_1.test now passes.

These results validate the final tree; they do not establish that every intermediate commit was separately built and tested.

Fingerprint baselines

The retained ADDBA prerequisite commits change tests/fingerprint/examples.csv and tests/fingerprint/showcases.csv relative to #1146. The TXOP conflict was resolved by retaining the ADDBA topic's existing values: 1f97-be23/tplx;22a3-c268/~tNl;c87d-3f3a/tyf. Fingerprints were not regenerated or rerun after this rebase, so that retained TXOP baseline remains unverified for the combined code. The compressed Block Ack feature commits introduce no additional fingerprint CSV changes.

Reading order

Review #1146 and #1148 first. The feature-only range on this rebased branch is 40c47b8316..79da7b5bd6; read its eleven commits in order:

  1. 595d47edb6 — add HT compressed Block Ack.
  2. 1635f4f110 — select Block Ack rates by base variant.
  3. 220a1dabab — answer valid compressed Block Ack requests.
  4. ef430efc1f — correct Block Ack receive-window handling.
  5. e229cb6f68 — make Block Ack receive processing transactional.
  6. 8bb191f7d9 — record frames at Block Ack window start.
  7. 76976394c0 — preserve Block Ack transaction state.
  8. 3372e7783d — correlate responses with the active receive step.
  9. c61a3a287f — centralize Block Ack receive-window arithmetic.
  10. 24edefc00f — enforce compressed BAR eligibility before state changes.
  11. 79da7b5bd6 — reject ineligible BARs before renewing agreement lifetime.

@mgonzalezlopezudc
mgonzalezlopezudc marked this pull request as ready for review August 15, 2026 19:19

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

Comment thread src/inet/linklayer/ieee80211/mac/rateselection/QosRateSelection.cc Outdated
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the feat-ht-compressedblockack branch from bd343f0 to 89030d8 Compare August 16, 2026 10:59
@mgonzalezlopezudc

Copy link
Copy Markdown
Contributor Author

@levy I've addressed all Devin's comments throughout the commits. There are only two for which I didn't perform any changes:

  • Runtime configuration: Devin missed the included setting at examples/wireless/qos/omnetpp.ini (line 24), which pins the AP to 10:00:00:00:00:00. The client peer lists are therefore correct.

  • Map → vector: uniqueness and cyclic order remain guaranteed by construction. ReceiveBuffer is still map-backed; the collectors probe each cyclic sequence number once; preceding excludes the SSN while following starts at it. Existing tests cover 4095 → 0 ordering and duplicate input.

@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the feat-ht-compressedblockack branch from ca92910 to 59e502b Compare August 23, 2026 23:19
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the feat-ht-compressedblockack branch from 59e502b to 172d4fe Compare September 5, 2026 22:41
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the feat-ht-compressedblockack branch from 3b7d064 to 79da7b5 Compare September 6, 2026 11:03
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the feat-ht-compressedblockack branch 2 times, most recently from 21fbbac to 17b47de Compare September 9, 2026 20:51
Link-layer initialization may resolve peer interfaces by their configured
addresses. Declare network-interface configuration as a prerequisite so these
queries see initialized identities regardless of module declaration order.
The physical-layer prerequisite remains in place.

This ordering supplies the shared readiness contract used by simplified
wireless association before network configuration.

No fingerprint or statistical baseline is changed. The selected regression
contract covers MacNonQos and MacQos, run 0, in examples/adhoc/qos, plus
simplified association and AP lifecycle module tests in debug mode.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.common.InitStages | behavior.change | test | ieee80211-htcapop-v3
Capability preparation previously depended on initialization broadcasts and
mixed local PHY support with active BSS operation. Make the MAC prepare an
idempotent profile through typed PHY contributors, and let management own
accepted BSS transitions and simplified peer installation.

Keep directional peer capabilities immutable and evaluate operation and HT
eligibility separately. Publish committed MIB changes after management
bookkeeping, guard state mutation, and replace modesetChanged listeners
with explicit configuration providers. Prepare simplified associations
before network configuration, independently of node declaration order.

Keep simplified legacy STAs associated without accepting HT operation from
an HT AP. Cover both declaration orders and shutdown/crash restart, while
retaining BSS identity and channel and removing AP-side peer resources on stop.

Migrate dependent consumers and regression fixtures together with the
contracts. Document public API migration and the notification lifetime.

Validation scope: debug build; 3 focused unit and 9 module cases covering
capability preparation, provider wiring, association, lifecycle, beacon and
channel updates; MacNonQos and MacQos run 0 fingerprints at 10s with unchanged
tplx expectations. No fingerprint or statistical baseline changes.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.ieee80211 | behavior.change | test expected whatsnew migration | ieee80211-htcapop-v3
Catalog-only consumers should not require capability preparation. Introduce
a paired C++/NED IIeee80211ModeSetProvider contract and make MAC
configuration extend it with the preparation operation used by management.
ModeSetModuleBase now depends only on the read-only provider.

Migrate the replacement-provider fixture to the narrow contract, removing
its throwing preparation stub. Update architecture, migration guidance and
release notes to identify the contract custom catalog providers implement.

Validation of the integrated changes: debug build, 5 focused module tests,
3 unit tests and 18 unchanged Wi-Fi/Ethernet/VLAN/configurator fingerprint
cases pass. Scoped architecture checks pass; interface checking reports
only the existing AV-CONTRACT-02 bodies. No recorded baseline changes.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.ieee80211 | refactor | whatsnew migration | ieee80211-htcapop-v3
Keep the implementation contracts available before the first commit that
references them. These drafts state planned work; the owning implementation
and closure commits record their completed plans and verification evidence.

Change: plan | behavior.add | -
Link-layer initialization may resolve peer interfaces by their configured
addresses. Declare network-interface configuration as a prerequisite so these
queries see initialized identities regardless of module declaration order.
The physical-layer prerequisite remains in place.

This ordering supplies the shared readiness contract used by simplified
wireless association before network configuration.

No fingerprint or statistical baseline is changed. The selected regression
contract covers MacNonQos and MacQos, run 0, in examples/adhoc/qos, plus
simplified association and AP lifecycle module tests in debug mode.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.common.InitStages | behavior.change | test | ieee80211-htcapop-v3
Capability preparation previously depended on initialization broadcasts and
mixed local PHY support with active BSS operation. Make the MAC prepare an
idempotent profile through typed PHY contributors, and let management own
accepted BSS transitions and simplified peer installation.

Keep directional peer capabilities immutable and evaluate operation and HT
eligibility separately. Publish committed MIB changes after management
bookkeeping, guard state mutation, and replace modesetChanged listeners
with explicit configuration providers. Prepare simplified associations
before network configuration, independently of node declaration order.

Keep simplified legacy STAs associated without accepting HT operation from
an HT AP. Cover both declaration orders and shutdown/crash restart, while
retaining BSS identity and channel and removing AP-side peer resources on stop.

Migrate dependent consumers and regression fixtures together with the
contracts. Document public API migration and the notification lifetime.

Validation scope: debug build; 3 focused unit and 9 module cases covering
capability preparation, provider wiring, association, lifecycle, beacon and
channel updates; MacNonQos and MacQos run 0 fingerprints at 10s with unchanged
tplx expectations. No fingerprint or statistical baseline changes.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.ieee80211 | behavior.change | test expected whatsnew migration | ieee80211-htcapop-v3
Catalog-only consumers should not require capability preparation. Introduce
a paired C++/NED IIeee80211ModeSetProvider contract and make MAC
configuration extend it with the preparation operation used by management.
ModeSetModuleBase now depends only on the read-only provider.

Migrate the replacement-provider fixture to the narrow contract, removing
its throwing preparation stub. Update architecture, migration guidance and
release notes to identify the contract custom catalog providers implement.

Validation of the integrated changes: debug build, 5 focused module tests,
3 unit tests and 18 unchanged Wi-Fi/Ethernet/VLAN/configurator fingerprint
cases pass. Scoped architecture checks pass; interface checking reports
only the existing AV-CONTRACT-02 bodies. No recorded baseline changes.

Plan: plan/done/80211htcapop-refactor-v3.md
Change: src.ieee80211 | refactor | whatsnew migration | ieee80211-htcapop-v3
Remove redundant blank lines from the affected IEEE 802.11 sources so subsequent functional changes contain no incidental whitespace cleanup.

Change: src.ieee80211 | format | -
Rate selection needs to distinguish equal-bitrate modes with different
guard intervals. Require an explicit data-mode query, retaining a negative
sentinel for PHYs without one. Reject unknown VHT guard-interval types
instead of interpreting them as short GI. Document the external API.

Change: src.ieee80211 | behavior.add | test whatsnew migration
The optional HT entries encode the wrong stream count or modulation. Use
one BPSK stream for MCS 32, 16-QAM on stream 4 for MCS 76 at 20 MHz, and
16-QAM on stream 3 for MCS 73 at 40 MHz.

Direct optional-MCS assertions cover stream count, per-stream modulation,
bitrate for both guard intervals and long-GI symbol duration; these entries are
not exercised by the selectable MCS 0-31 catalog.

Change: src.ieee80211.Ieee80211HtmcsTable | behavior.change.fix | test whatsnew
…on support

Register the n(greenfield-2.4Ghz) mode set and distinguish selectable operational modes (containsMode) from supported PHY capabilities (supportsMode). HT Greenfield profiles now explicitly support non-HT and HT-mixed response modes without making them selectable for data transmissions.

Precompute immutable control-response mappings in Ieee80211ModeSet and make the mode-set registry thread-local to ensure thread safety.

In the physical layer, validate per-packet transmission requests and reception feasibility against supported mode capabilities. Decompose transmission duration into preamble, header, and data intervals, correctly accounting for HT/VHT SIG field integration in the preamble. Publish modesetChangedSignal upon radio mode set transitions.

Add unit test coverage for HT Greenfield compliant modes, duration decomposition, transmitter transition invariants, and ERP mode isolation.
…Greenfield integration

Apply IEEE 802.11-2024 control-response rules in DCF and QoS rate selection: ordinary HT ACK and Basic BlockAck responses use mandatory non-HT rates, and CTS responses to HT-carried RTS frames use the HT-mixed format. Translate configured CTS response rates to their corresponding HT-mixed counterparts while preserving MCS, bandwidth, NSS, and guard interval.

Enforce mode set initialization invariants by failing fast if RateSelection has no mode set at link-layer initialization, and rebuild configured modes atomically on dynamic mode-set changes via modesetChangedSignal.

Add "n(greenfield-2.4Ghz)" to wireless interface and MAC module NEDs, and provide an end-to-end Greenfield ping simulation example in omnetpp-ht-greenfield.ini.

Document backward compatibility notes in WHATSNEW regarding 802.11n control-response rate selection. Add comprehensive unit and module test coverage for rate selection, dynamic mode-set rebinding, and HT Greenfield and Mixed runtime exchanges.
…T-mixed for mixed peers

- Mode & physical layer introspection:
  - Add virtual isHtGreenfield() query to IIeee80211Mode and override it in Ieee80211HtMode to identify Greenfield preamble modes.
  - Track htGreenfieldSupported in Ieee80211ModeSet constructor and expose isHtGreenfieldSupported() accessor.
  - Expose findHtMixedMode() on Ieee80211ModeSet to resolve the HT-mixed equivalent of any HT mode based on precomputed response tables.

- MIB & directional capability negotiation:
  - Populate localHtCapabilities.greenfield from modeSet->isHtGreenfieldSupported() in Ieee80211Mib::updateLocalHtCapabilities.
  - Add receiverGreenfield to Ieee80211HtDirectionalCapabilities and populate directional flags during negotiateHtCapabilities().

- Rate selection peer filtering & HT-mixed fallback:
  - In isCompatibleHtMode(), reject candidate Greenfield modes when the negotiated receiver did not advertise Greenfield support.
  - In selectPeerCompatibleMode(), dynamically map Greenfield candidate modes to their legal HT-mixed equivalents, allowing Greenfield stations to communicate with mixed-format peers at high throughput before falling back to legacy rates.

- Testing:
  - Update tests/unit/Ieee80211HtCapabilities_1.test with directional Greenfield capability assertions.
  - Add tests/module/Ieee80211HtHeterogeneousGreenfieldRuntime.test verifying bidirectional unicast data delivery and dynamic HT-mixed frame format selection in a heterogeneous Greenfield/Mixed BSS.
… peer mode selection

- Rate selection peer filtering:
  - In selectPeerCompatibleMode(), use modeSet->supportsMode(mode) instead of modeSet->containsMode(mode) to validate candidate modes.
  - While containsMode() verifies persistent selectable operating modes (which for Greenfield mode sets only include Greenfield PPDUs), supportsMode() correctly covers supported supplementary modes, such as mandatory HT-mixed CTS responses required by IEEE 802.11-2024 subclauses 10.6.6.1 and 10.6.6.5.7.
  - This prevents runtime simulation aborts when Greenfield stations respond to HT RTS frames in infrastructure networks.

- Testing:
  - Add assertions in tests/unit/Ieee80211PeerModeSelection_1.test verifying that selectPeerCompatibleMode() accepts HT-mixed CTS modes for n(greenfield-2.4Ghz) mode sets while still rejecting unsupported MCS indices.
  - Update tests/module/Ieee80211HtHeterogeneousGreenfieldRuntime.test with RTS/CTS enabled (rtsThreshold = 1B) to verify end-to-end HT-mixed CTS generation and transmission by Greenfield stations.
…d HT-mixed fallback

- Peer mode selection testing:
  - Add optional greenfield receiver capability parameter to makePeerState() helper in Ieee80211PeerModeSelection_1.test.
  - Verify selectPeerCompatibleMode() selects HT-Greenfield modes when communicating with a Greenfield-capable peer.
  - Verify isCompatibleHtMode() rejects HT-Greenfield modes when the destination station did not advertise Greenfield reception, causing selectPeerCompatibleMode() to fall back to the compatible HT-mixed equivalent mode.
  - Verify candidate HT-mixed modes remain unaffected regardless of the destination station's Greenfield reception capability.
… GI HT and VHT modes

- Physical layer transmission duration decomposition:
  - In Ieee80211Transmitter::createTransmission(), compute dataDuration using transmissionMode->getDataDuration(B(phyHeader->getLengthField())) instead of raw transmissionMode->getDataMode()->getDuration(...).
  - For HT mixed format and VHT modes configured with Short Guard Interval (Short GI / 400 ns), standard IEEE 802.11 symbol-boundary rounding (IEEE Std 802.11-2024, Eq. 19-90 and Eq. 21-109) rounds data airtime up to the 4 us symbol boundary.
  - Comparing duration == preambleDuration + dataDuration now correctly evaluates to true for HT/VHT Short GI transmissions, setting headerDuration to zero (since SIG fields are included in the preamble) and preventing negative dataDuration calculation and runtime simulation errors.
  - For legacy PHY modes with standalone PLCP headers (OFDM, ERP, DSSS, HR-DSSS), duration == preambleDuration + dataDuration remains false, preserving the header duration allocation.

- Testing:
  - Update assertTransmitterDurationDecomposition() helper in tests/unit/Ieee80211HtGreenfield_1.test to verify duration decomposition with getDataDuration() and accept zero-header HT/VHT modes.
  - Add test assertions covering VHT Short GI, HT Mixed Short GI, and HT Greenfield Short GI modes with both 0-byte and 64-byte payloads.
Scalar signal models forwarded header and data durations to their base
constructor in reverse order. Preserve chronological phase boundaries
for both transmission and reception analog models.

Add direct TX/RX coverage with distinct preamble, header and data durations.
Using the full PHY prefix as the preamble left HT and VHT transmissions
with no timed header phase. Use the mode's chronological duration
accessors while retaining the exact total-duration check.

Check positive HT header durations in mixed and Greenfield runtime cases,
and verify packet and analog phase boundaries across HT, VHT and legacy
catalog variants.
Optional multicast requests such as 9 and 18 Mb/s could select the fastest
mandatory legacy rate and exceed the requested bitrate. Select the
highest mandatory legacy rate within the ceiling, preserving exact
mandatory requests.

Report an error when mandatory legacy modes exist but none meets the
bound. Preserve the request when the mandatory legacy set is empty.
Cover optional rates, exact requests and both fallback boundaries.
A response bitrate can identify multiple HT MCS, bandwidth, stream-count
and guard-interval combinations. Expose matching qualifiers for DCF/QoS
ACK and CTS, plus QoS BlockAck, and reject ambiguous configured matches
instead of silently depending on catalog order.

Mode-set lookup enforces uniqueness only when requested. Automatic
responses and other lookup callers retain their existing behavior.
Verify qualified CTS conversion, invalid and automatic configurations,
and configured multicast ceilings through both production selectors.
The HT catalog can represent 40 MHz modes, but the packet-level
transmitter and receiver advertise only 20 MHz operation. Clarify that
nonzero secondary-channel offsets require PHY width support and are
rejected by these providers.
The GI base now coordinates mode transitions explicitly and gates HT data on a committed BSS relationship. Exercise those production paths in the Greenfield fixtures, including infrastructure exchanges and null catalog providers. Match the chronological PHY phases and preserve ownership of catalog preambles in synthetic mode tests.

Keep the upstream null-request group-mode fallback while applying the topic rate ceiling to explicit requests. Update the group-selection assertions to cover both contracts.

Final-tree validation: debug INET build, 9 focused unit tests, 11 focused module tests, MAC/PHY architecture checks, and TXOP tplx/~tNl fingerprints pass. The graphical tyf fingerprint differs and is not updated. No intermediate commit was built or tested.
Use the equivalent capability-refactor code snapshots c913a63 and 8f147ea as the logical merge base. Preserve both MAC interfaces, Greenfield malformed-AID coverage, and ADDBA QoS expectations.
Implement one-TID compressed BlockAckReq and 64-bit compressed BlockAck exchanges across the QoS MAC path.

Correct BAR and BA Control and Starting Sequence Control serialization, including the Basic BAR wire length, little-endian fields, fragment-number packing, and compressed frame lengths.

Extend originator and recipient agreement handling, HCF dispatch, frame sequences, rate selection, protection timing, reordering, and acknowledgment processing. Preserve immediate versus delayed ADDBA policy and return the required all-zero compressed Block Ack when no matching recipient state exists.

Keep selection default-off behind the documented assumePeerSupportsCompressedBlockAck model assumption. Reject fragmented and delayed-policy exchanges, maintain the recipient acknowledgment-window boundary, and preserve leading holes including sequence-number wraparound.

Add byte-exact unit coverage for Basic and compressed variants, bitmap and wraparound behavior, capability and agreement gates, plus a deterministic HT runtime exchange test.
Classify BlockAck and BlockAckReq frames through their base classes in QosRateSelection so compressed requests follow the same control-rate policy as Basic requests.

This prevents an originated Compressed BlockAckReq from falling through to the ordinary control-frame path and reusing the last transmitted data mode when the mandatory Block Ack fallback should be selected.

Add focused coverage with distinct mandatory and last-transmitted modes, verifying Basic and Compressed BAR symmetry while preserving RTS behavior.
Remove the recipient-side peer capability assumption from compressed Block Ack response selection. An addressed, syntactically valid one-TID compressed BlockAckReq must receive a compressed BlockAck after SIFS, including the all-zero response when no matching partial state exists, as required by IEEE 802.11-2024 sections 9.3.1.7.2 and 10.25.6.5.

Keep the originator-side capability assumption as the explicit opt-in for selecting compressed BlockAckReq frames until per-peer HT capability management is modeled. Continue rejecting nonzero fragment numbers and suppressing immediate responses for unaccepted or delayed agreements.

Update the focused unit and runtime coverage to verify null-state responses, malformed fragment rejection, agreement-policy gates, and asymmetric endpoint configuration.
Make BlockAckRecord the authoritative owner of WinStartR and update the scoreboard for every successfully received related Data MPDU. Advance it from newer Data frames and BlockAckReq starting sequence numbers instead of coupling acknowledgment state to upward packet delivery.

Fix empty Basic Block Ack records so current-window sequence and fragment entries are reported as unacknowledged while entries older than WinStartR remain acknowledged.

Keep the reordering window independent from the acknowledgment window. When a future MPDU or BAR advances the window, deliver complete displaced MSDUs, discard incomplete stale entries, retain packets beyond gaps, and preserve cyclic delivery order across the 4095-to-0 boundary. Detach returned packets before deleting stale receive-buffer state.

Replace the station-wide compressed Block Ack assumption with capability state stored per agreement. Derive it from explicit local support and a configured peer-address list until HT Capabilities elements are modeled. Use compressed BAR only for established immediate agreements that support it, and suppress compressed Block Ack responses when no agreement exists.

Add focused unit and runtime coverage for Basic and Compressed bitmaps, Data- and BAR-driven window movement, wraparound, gaps, fragments, duplicates, ownership, Normal Ack reception, capability gating, null responses, serialization, and the BAR-to-BA exchange.

Multi-TID Block Ack remains unsupported. BA Control bit 0 remains clear because it is reserved by IEEE 802.11-2024, rather than a BA Ack Policy bit.

Fingerprint validation found five expected maintained-ingredient changes in QoS and Block Ack scenarios. The three previously retained tyf values were also rechecked and found stale. Fingerprint CSV updates are intentionally not included pending separate approval.
Update the Block Ack scoreboard for every related received QoS Data MPDU, including frames using Normal Ack, independently of reorder-buffer admission.

Handle the receive-window cases explicitly: ignore old sequence numbers, record in-window MPDUs, and advance WinStartR before recording MPDUs beyond WinEndR. This behavior deliberately applies to both Basic and Compressed Block Ack agreements, as required by IEEE 802.11-2024 sections 10.25.6.3 and 10.25.6.4.

Make far-ahead reorder-window movement transactional. Validate and insert the incoming MPDU against the proposed WinStartB before releasing displaced MSDUs or changing NextExpectedSequenceNumber. If admission fails, discard only the incoming packet and preserve the reorder window and its buffered frames, while retaining the independently required scoreboard update.

Calculate receive-buffer capacity after accounting for entries displaced by the proposed window. Count each fragment as one buffer slot, allow an advancing MPDU to reuse slots that will be reclaimed, and remove incomplete stale entries only after successful admission. Preserve delivery of complete displaced and consecutive MSDUs, including across the 4095-to-0 sequence number boundary.

Centralize supported one-TID BlockAckReq classification and extraction of the variant, TID, and starting sequence number. Use the shared classifier in HCF, RecipientQosMacDataService, and BlockAckReordering so only Basic and Compressed requests reach the implemented paths. Multi-TID requests remain unsupported and follow the existing rejection behavior.

Extend the focused Block Ack tests to cover old scoreboard inputs, Normal-Ack behavior with Basic Block Ack, fragment-full admission failure, successful slot reclamation across sequence wrap, real HCF dispatch through a procedure spy, and consistent Basic, Compressed, and Multi-TID request classification.
Accept WinStartR in the receiver Block Ack bookkeeping and add focused Basic and Compressed Block Ack coverage for the boundary.
Scope Basic and Compressed BAR status transitions by receiver, and match incoming Block Ack responses against the active request before completing the receive step or changing recovery state. Unrelated responses leave the wait and timer active.

Update the recipient scoreboard after successful buffer admission so capacity-rejected MPDUs remain unacknowledged and failed window advances preserve both cursors. Allow valid negative intermediate values in cyclic sequence arithmetic for wraparound admission.

Add multi-peer, response-correlation, buffer-capacity, and sequence-wrap regressions. Correct the rejected-frame test expectation to require an unchanged scoreboard.

Validation: debug build, four focused unit tests, two module tests, architecture checks, and independent review passed. Both selected legacy fingerprint mismatches reproduce identically at the unchanged parent; recorded fingerprint baselines remain untouched.
An ACK, CTS, data frame, or unrelated control frame addressed to the station could abort a BAR exchange while it awaited a Block Ack. Reject frames outside the expected response type before transferring ownership or handling cancellation, while retaining peer, TID, and variant matching for Block Ack responses.

Have DCF honor rejected responses without cancelling the receive timer. Cover Basic and Compressed BAR waits through matching completion and timeout, including an unrelated frame arriving halfway through the wait.
Block Ack records, receive buffers, and reordering repeated cyclic window comparisons and advancement calculations. Route these decisions through a stateless BlockAckWindow service so their wraparound and half-sequence-space semantics stay consistent while each consumer retains ownership of its state.

Preserve the existing comparisons and add focused unit coverage for window edges, sequence wraparound, candidate starts, and the unordered antipodal boundary.
A compressed BAR with a nonzero fragment number could advance the receive
window before the acknowledgment policy rejected its response. Share
recipient acceptance checks before reorder processing and response
selection, requiring an established immediate agreement with snapshotted
local HT operation and configured peer compressed Block Ack support.

Sparse outstanding sequences such as 0 and 100 could leave sequence 100
waiting for a response that cannot represent it. Reject compressed
selection when the matching set exceeds the 64-position bitmap and limit
transmitted-BAR acknowledgment transitions to that window.

Add module regressions for unchanged receive state and no response after
rejected BARs, capability gates, sparse and wrapping sequences, timeout,
and subsequent requests for frames outside the first window.

Validation: debug build, two focused unit tests, four focused module tests,
and scoped architecture, naming, and seal checks pass. The legacy
MacQosWithBlockAck fingerprint mismatch is identical on original HEAD;
no fingerprint baseline changes are included.
Malformed compressed BARs were rejected by receive-state and response
processing but still renewed the recipient inactivity deadline through
blockAckReqReceived. Apply the shared eligibility check in the agreement
handler before updating the deadline or scheduling the inactivity timer.

Extend the module regression with elapsed simulation time to verify that
malformed and capability-ineligible BARs preserve the existing deadline,
while valid compressed and Basic BARs still renew it. The new assertion
fails before the fix and passes afterward.

Validation: debug build, compressed BAR validation and inactivity timer
module tests, ADDBA transaction unit test, scoped architecture check, and
diff whitespace check pass.
A delayed Block Ack from an earlier BAR to the same peer and TID can complete a later receive step and acknowledge its outstanding frames. Require the response starting sequence number to match the active Basic or Compressed BAR.

Extend the HCF response correlation test with successive BARs whose bitmap windows overlap. Assert that the stale response preserves the timeout and acknowledgment statuses, and that a matching response still succeeds.
Local and per-peer configuration can enable compressed Block Ack agreements even when the active mode set is legacy. Require a non-null mode set supporting HT operation before advertising peer compressed Block Ack support.

Cover capability checks and agreement creation with null, legacy a/b/g, and HT mode sets while retaining local and per-peer gating coverage.
Established Block Ack agreements retain their compressed-support flag when the mode set changes. Check the current HT capability at request selection so a switch to a legacy mode immediately selects Basic BAR.

Exercise the production frame-sequence selector across HT-to-a/b/g transitions with the same agreement, including return to HT and an absent mode set. The transition assertion fails before the fix. The debug build, focused compressed Block Ack unit and runtime module tests, and scoped architecture checks pass.
When a Basic BAR preceded sparse frames, processTransmittedBlockAckReq
marked every frame with a sequence number at or above the starting
sequence number as awaiting its response. Because processReceivedBlockAck
and timeout handling update only the 64-sequence-number window of the
Basic Block Ack bitmap, frames beyond offset 63 were never updated,
becoming neither retransmittable nor eligible for subsequent requests.

Limit the acknowledgment status transition for transmitted Basic BARs to
the 64-sequence-number window using BlockAckWindow::isWithin, matching
the Basic BlockAck bitmap coverage.

Add unit and module regressions for sparse and wrapping sequence sets
under Basic BAR, verifying that out-of-window frames remain outstanding
and can be requested by subsequent BAR transmissions. Apply the active
mode set to originator policy checks in the validation test.

Validation: debug and release builds, focused unit and module tests,
and scoped architecture, naming, and source-seal gates pass.
@mgonzalezlopezudc
mgonzalezlopezudc force-pushed the feat-ht-compressedblockack branch from 596ea06 to 947f1af Compare September 21, 2026 13:51

This branch had an error being deployed

1 failed (outdated) deployment
sealed-source-change — ed210c58 Deployed Sep 6, 2026 by mgonzalezlopezudc via Approve sealed source #40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant